/*
 * @Author: zhang zhijiang 2824735304@qq.com
 * @Date: 2025-04-24 21:15:22
 * @LastEditors: zhang zhijiang 2824735304@qq.com
 * @LastEditTime: 2025-04-26 14:44:00
 * @FilePath: /linux/tcpcalculator/test.cc
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
#include"protocol.hpp"
int main1()
{
    // request re(1,2,'+');
    // std::string s ;
    // re.serialize(s);
    // cout<<s<<endl;
    // std::string content = Encode(s);
    // cout<<content;
    // std::string u;
    // Decode(content,u);
    // cout<<u<<endl;
    // request r;
    // r.deserialize(u);
    // cout<<r.x<<r.op<<r.y<<endl;
    response re(1000,0);
    std::string s;
    re.serialize(s);
    cout<<s<<endl;
    std:: string package = Encode(s);
    cout<<package;

    response r;
    std::string content;
    Decode(package,content);
    cout<<content<<endl;
    r.deserialize(content);
    cout<<r.result<<r.code<<endl;
    
    return 0;
}